/**
 * File: MapLocationWriter.java
 * Created by: mhaimel
 * Created on: 18 Aug 2009
 * CVS:  $Id: MapLocationWriter.java,v 1.1 2009/08/27 14:52:44 mhaimel Exp $
 */
package uk.ac.ebi.curtain.util.io;

import java.io.PrintWriter;

import uk.ac.ebi.velvet.model.MapLocation;

/**
 * @author mhaimel
 *
 */
public class MapLocationWriter extends AbstractWriter<MapLocation> {

	public MapLocationWriter(PrintWriter out) {
		super(out);
	}
	/* CtgId | ReadID | location| FlagByte  | readStrand | alignStrand */
	@Override
	protected void _doWrite(MapLocation bean) {
		writeColumn(wrap(bean.getContig()));
		writeColumn(wrap(bean.getRead()));
		writeColumn(wrap(bean.getLocation()));
		writeColumn(wrap(bean.getFlag().getByteVal()));
		writeColumn(bean.getReadOrientation());
		_write(bean.getAlignmentOrientation());
		getWriter().println();
	}
}
